﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZhonTai.Industry.Contracts.Model.Entity;
using ZhonTai.Industry.Core.CraftGather.Save;

namespace ZhonTai.Industry.Core.Service.MessageHandler.CraftGather
{
    public class SaveMessageHandler : IMessageHandler
    {
        private readonly SaveHandle _saveHandle;

        public SaveMessageHandler(SaveHandle saveHandle)
        {
            _saveHandle = saveHandle;
        }

        public async Task HandleAsync(PushShip message)
        {
            await _saveHandle.ExecuteAsync(message);
        }
    }
}